import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/Home'

Vue.use(Router)

export default new Router({
  mode:"history",
  routes: [
    {path: "/login",component: () => import('@/login/index'), name: "login"},
    {
      path: '/',
      name: 'home',
      component: Home,
      children: [
        {path: "test", component: () => import('@/views/test/index'), name: "test"},
        {path: "miniUser", component: () => import('@/views/miniUser/index'), name: "miniUser"},
        {path: "menu", component: () => import('@/views/system/menu/index'), name: "menu"},
        {
          path: 'tree',
          name: 'Tree',
          component: () => import('@/views/json/index'),
          meta: {title: '绑定JSON', icon: 'tree'}
        }
      ]
    }

  ]

})
